package com.ssx.controller;

import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ssx.entity.Role;
import com.ssx.service.IRoleService;
import com.ssx.service.impl.RoleServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Package com.ssx.controller
 * @ClassName RoleController
 * @Copyright: Copyright (c) 2020
 * @Date 2020/10/26 10:58
 * @Company www.sudaoxi.com.cn
 * @Author 苏道羲
 * @Version 1.0
 * @Description
 */
@RestController
@RequestMapping("/role")
public class RoleController {

    @Autowired
    private IRoleService service;

    @RequestMapping("/showSelect")
    public String showSelect(){
        List<Role> role= service.list(new QueryWrapper<Role>().gt("roleId", 1));
        return JSON.toJSONString(role);
    }
}
